﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <base href="<%=basePath %>">
    <title>管理查看考勤</title>
    <link href="<%=basePath %>attend/frame/images/skin.css" rel="stylesheet" type="text/css" />
	<link href="<%=basePath %>attend/css/tab.css" rel="stylesheet" type="text/css" />
	<link href="<%=basePath %>attend/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
	<script language="javascript" type="text/javascript" src="<%=basePath %>attend/js/tab.js"></script>
	<script type="text/javascript">
		function reloadGo(sta) {
			var txtCurrentPage = document.getElementById("txtCurrentPage").value;
			var type = "^\\d+$";
			var re = new RegExp(type);
			if (txtCurrentPage.match(re) == null) {
				document.getElementById("txtCurrentPage").value="";
				alert("请输入整数!");
				return;
			}
			window.location.href = "Admins?sta="+sta+"&pagerMethod=go&currentPage=" + txtCurrentPage;
		}
	</script>
	<script language="JavaScript" type="text/javascript" src="<%=basePath %>attend/js/jquery-1.7.1.min.js"></script>
	<script language="javascript" type="text/javascript" src="<%=basePath %>attend/My97DatePicker/WdatePicker.js"></script>
</head> 
  
  <body>
   		<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="<%=basePath %>attend/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="<%=basePath %>attend/frame/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="admins"><c:choose>
		      <c:when test="${con==1}">本月员工考勤</c:when>
		      <c:when test="${con==2}">上月员工考勤</c:when>
		      <c:when test="${con==3}">近3月员工考勤</c:when>
		</c:choose></div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="<%=basePath %>attend/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="<%=basePath %>attend/frame/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    <!--    内嵌代码 Start-->
    <form action="Admins?sta=${con}" name="admin" method="post">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr>
	    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="15" height="30"><img src="<%=basePath %>attend/images/tab_03.gif" width="15" height="30" /></td>
	        <td background="<%=basePath %>attend/images/tab_05.gif" height="30" class="STYLE1" valign="bottom">
	        <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
				  <tr>
				    <td width="6%" align="right" class="STYLE1">姓 名：</td>
				    <td width="10%" class="STYLE1"><input style= "width:100px; font-size:12px" name="username" title=请输入姓名！ type="text" value="${nam}"></td>
				    <td width="5%" align="right" class="STYLE1">校 区：</td>
				    <td width="10%" class="STYLE1"><select name="schID" style= "width:100px" title="点击选择校区！">  
						<option value="0" <c:if test="${schId==0}">selected</c:if>>----</option>
	                     <c:forEach items="${depali}" var="sch">
	                     	<option value="${sch.deptId}" <c:if test="${schId==sch.deptId}">selected</c:if>> ${sch.deptName} </option>
	                     </c:forEach>
      				</select></td>
      				<td width="6%" align="right" class="STYLE1">日期：</td>
					<td width="35%" class="STYLE1"><input name="startTime" value="${startTime}" type="text" style="width:120px;" id="d5221" class="Wdate" 
		    onFocus="var d5222=$dp.$('d5222');WdatePicker({onpicked:function(){d5222.focus();},maxDate:'#F{$dp.$D(\'d5222\')}'})"/>
		    至&nbsp;<input name="endTime" value="${endTime}" type="text" style="width:120px;" id="d5222" class="Wdate" 
                onFocus="WdatePicker({minDate:'#F{$dp.$D(\'d5221\')}'})"/></td>
				    <td width="6%" align="right" class="STYLE1">状 态：</td>
				    <td width="10%" class="STYLE1"><select name="state" style= "width:80px; font-size:12px" title="点击选择状态！">  
						<option value="0" <c:if test="${state==0}">selected</c:if>>----</option>
						<option value="1" <c:if test="${state==1}">selected</c:if>> 正 常 </option>
						<option value="2" <c:if test="${state==2}">selected</c:if>> 迟 到 </option>
						<option value="3" <c:if test="${state==3}">selected</c:if>> 早 退 </option>
						<option value="4" <c:if test="${state==4}">selected</c:if>> 调 休 </option>
						<option value="5" <c:if test="${state==5}">selected</c:if>> 旷 工 </option>
						<option value="6" <c:if test="${state==6}">selected</c:if>> 出 差 </option>
						<option value="7" <c:if test="${state==7}">selected</c:if>> 婚 假 </option>
						<option value="8" <c:if test="${state==8}">selected</c:if>> 年 假 </option>
						<option value="9" <c:if test="${state==9}">selected</c:if>> 病 假 </option>
						<option value="10" <c:if test="${state==10}">selected</c:if>> 事 假 </option>
						<option value="11" <c:if test="${state==11}">selected</c:if>> 丧 假 </option>
						<option value="12" <c:if test="${state==12}">selected</c:if>> 产 假 </option>
						<option value="13" <c:if test="${state==13}">selected</c:if>> 陪产假 </option>
	      			</select></td>
				    <td width="14%" class="STYLE1"><input class="STYLE1" name="submit" type="submit" value="搜  搜"></td>
				  </tr>
			</table></td>
	        </tr>
	    </table></td>
	        <td width="14"><img src="<%=basePath %>attend/images/tab_07.gif" width="14" height="30" /></td>
	  </tr>
	    </table></td>
	  </tr>
	  <tr>
	    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="9" background="<%=basePath %>attend/images/tab_12.gif">&nbsp;</td>
	        <td bgcolor="#f3ffe3">
<!--内嵌Table Start-->
	      <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98" onMouseOver="changeto()" onMouseOut="changeback()">
			  <tr>
			    <th width="6%" height="26" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">姓 名</div></th>
			    <th width="6%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">考勤编号</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">校 区</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">部 门</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">星 期</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">日 期</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">上班时间</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">下班时间</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">状 态</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">迟 到</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">早 退</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">是否确认</div></th>
			    <th width="8%" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">备 注</div></th>
			  </tr>
			  <c:forEach items="${attli}" var="att">
				  <tr>
				    <td height="25" bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">${att.username}</td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">${att.badgenumber}</td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">${att.deptname}</td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">${att.subdept}</td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><c:choose>
		            	<c:when test="${att.attweek==1}"><font color="red">星期天</font></c:when>
		            	<c:when test="${att.attweek==2}">星期一</c:when>
		            	<c:when test="${att.attweek==3}">星期二</c:when>
		            	<c:when test="${att.attweek==4}">星期三</c:when>
		            	<c:when test="${att.attweek==5}">星期四</c:when>
		            	<c:when test="${att.attweek==6}">星期五</c:when>
		            	<c:when test="${att.attweek==7}"><font color="red">星期六</font></c:when>
		            </c:choose></td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">
				    
				    <c:choose>
		            	<c:when test="${att.attweek==1||att.attweek==7}"><font color="red">${att.attdate}</font></c:when>
		            	<c:otherwise>${att.attdate}</c:otherwise>
		            </c:choose>
		            </td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">${att.attworktime}</td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">${att.attclosingtime}</td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><c:choose>
		            	<c:when test="${att.attstate==1}"><font color="green">正常</font></c:when>
		            	<c:when test="${att.attstate==2}"><font color="#F0C911">迟到</font></c:when>
		            	<c:when test="${att.attstate==3}"><font color="#F0C911">早退</font></c:when>
		            	<c:when test="${att.attstate==4}"><font color="#F0C911">调休</font></c:when>
		            	<c:when test="${att.attstate==5}"><font color="#FF0000">旷工</font></c:when>
		            	<c:when test="${att.attstate==6}"><font color="#0000FF">出差</font></c:when>
		            	<c:when test="${att.attstate==7}"><font color="#FF6600">婚假</font></c:when>
		            	<c:when test="${att.attstate==8}"><font color="#F72056">年假</font></c:when>
		            	<c:when test="${att.attstate==9}"><font color="#999999">病假</font></c:when>
		            	<c:when test="${att.attstate==10}"><font color="#999999">事假</font></c:when>
		            	<c:when test="${att.attstate==11}"><font color="#999999">丧假</font></c:when>
		            	<c:when test="${att.attstate==12}"><font color="#999999">产假</font></c:when>
		            	<c:when test="${att.attstate==13}"><font color="#999999">陪产假</font></c:when>
		            </c:choose></td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><c:choose>
		            	<c:when test="${att.attlatetime==0}"><font color="red">未迟到</font></c:when>
		            	<c:otherwise>${att.attlatetime}<font color="#6666CC">分钟</font></c:otherwise>
		            </c:choose></td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><c:choose>
		            	<c:when test="${att.attearlytime==0}"><font color="#FF3300">未早退</font></c:when>
		            	<c:otherwise>${att.attearlytime}<font color="#6666CC">分钟</font></c:otherwise>
		            </c:choose></td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><c:choose>
		            	<c:when test="${att.attconfirm==0}"><font color="#FF3300">处理中</font></c:when>
		            	<c:when test="${att.attconfirm==1}"><font color="green">已确认</font></c:when>
		            	<c:when test="${att.attconfirm==2}"><font color="green">申诉中</font></c:when>
		            	<c:when test="${att.attconfirm==3}"><font color="green">申诉成功</font></c:when>
		            	<c:when test="${att.attconfirm==4}"><font color="green">已驳回</font></c:when>
		            	<c:when test="${att.attconfirm==5}"><font color="green">待确认</font></c:when>
		            </c:choose></td>
				    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">${att.attdesc}</td>
				  </tr>
			  </c:forEach>
		</table>
<!-- 内嵌Table end-->
	        </td>
	        <td width="9" background="<%=basePath %>attend/images/tab_16.gif">&nbsp;</td>
	      </tr>
	    </table></td>
	  </tr>
	  <tr>
	    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="15" height="29"><img src="<%=basePath %>attend/images/tab_20.gif" width="15" height="29" /></td>
	        <td background="<%=basePath %>attend/images/tab_21.gif" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td width="25%" height="29" nowrap="nowrap"><span class="STYLE1">共<font color="#FF0000">${page.totalRows}</font>条纪录，当前第<font color="#0066FF">${page.currentPage}</font>/共<font color="#0066FF">${page.totalPages}</font>页，每页<font color="#FF0000">${page.pageSize}</font>条纪录
              <!--   &nbsp;&nbsp;<label title="请输入全名查询哦！">迟到统计分钟：<font color="#FF0000">${sum.lateSum}</font>分钟</label> --></span></td>
	            <td width="75%" valign="top" class="STYLE1"><div align="right">
	              <table width="352" height="20" border="0" cellpadding="0" cellspacing="0">
	                <tr>
	                  <td width="62" height="22" valign="middle"><div align="right"><a href="Admins?pagerMethod=first&sta=${con}"><img src="<%=basePath %>attend/images/first.gif" width="37" height="15" border="0" /></a></div></td>
	                  <td width="50" height="22" valign="middle"><div align="right"><a href="Admins?pagerMethod=previous&currentPage=${page.currentPage}&sta=${con}"><img src="<%=basePath %>attend/images/back.gif" width="43" height="15" border="0" /></a></div></td>
	                  <td width="54" height="22" valign="middle"><div align="right"><a href="Admins?pagerMethod=next&currentPage=${page.currentPage}&sta=${con}"><img src="<%=basePath %>attend/images/next.gif" width="43" height="15" border="0" /></a></div></td>
	                  <td width="49" height="22" valign="middle"><div align="right"><a href="Admins?pagerMethod=last&sta=${con}"><img src="<%=basePath %>attend/images/last.gif" width="37" height="15" border="0" /></a></div></td>
	                  <td width="59" height="22" valign="middle"><div align="right" class="STYLE1">转到第</div></td>
	                  <td width="25" height="22" valign="middle" class="STYLE1">
		                  <span class="STYLE1">
		                  	<input id="txtCurrentPage" type="text" title="请输入整数哦！" style="height:18px; width:30px; font-size:12px" size="5" />
		                  </span>
	                  </td>
	                  <td width="23" height="22" valign="middle" class="STYLE1">页</td>
	                  <td width="30" height="22" valign="middle"><a href="javascript:void(0);" onClick="reloadGo(sta='${con}');"><img src="<%=basePath %>attend/images/go.gif" width="37" height="15" border="0" /></a></td>
	                </tr>
	              </table>
	            </div></td>
	          </tr>
	        </table></td>
	        <td width="14"><img src="<%=basePath %>attend/images/tab_22.gif" width="14" height="29" /></td>
	      </tr>
	    </table></td>
	  </tr>
	</table>
	</form>
	<!--内嵌代码 end-->
	</td>
    <td background="<%=basePath %>attend/frame/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="<%=basePath %>attend/frame/images/buttom_bgs.gif"><img src="<%=basePath %>attend/frame/images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
  </body>
</html>
